function Dictionary() {
  this.items = {};

  Dictionary.prototype.has = key => {
    for (let i = 0; i < this.size(); i++) {
      if (key == this.keyShow()[i]) {
        return true
      }
    }
    return false
  }

  Dictionary.prototype.set = (key, value) => {
    if (this.has(key)) {
      this.item[key] = value
    }
    this.items[key] = value
  }

  Dictionary.prototype.get = key => {
    if (this.has(key)) {
      return this.item[key]
    }
    return null
  }

  Dictionary.prototype.keyShow = () => {
    return Object.keys(this.items)
  }

  Dictionary.prototype.valueShow = () => {
    let result = []
    for (let i = 0; i < this.size(); i++) {
      result.push(this.items[this.keyShow()[i]])
    }
    return result
  }

  Dictionary.prototype.size = () => {
    return Object.keys(this.items).length
  }

  Dictionary.prototype.remove = key => {
    if (this.has(key)) {
      delete this.items[key]
      return
    }
    return null
  }

  Dictionary.prototype.clear = () => {
    this.items = {}
  }
}